home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / TelephoneTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-06  |  6.3 KB  |  306 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4.  TelephoneTools.h
  5.  C Interface to the Telephone Manager
  6.  
  7.  
  8.   Copyright Apple Computer, Inc. 1990-1993
  9.   All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __TELEPHONETOOLS_
  15. #define __TELEPHONETOOLS_
  16.  
  17.  
  18. #ifndef __DIALOGS__
  19. #include <Dialogs.h>
  20. #endif
  21.  
  22. #ifndef __TYPES__
  23. #include <Types.h>
  24. #endif
  25.  
  26.  
  27. #define vdefType    'vdef'        /* main telephone definition procedure    */
  28. #define vvalType    'vval'        /* validation definition procedure    */
  29. #define vsetType    'vset'        /* telephone setup definition procedure    */
  30. #define vlocType    'vloc'        /* telephone configuration localization defProc    */
  31. #define vscrType    'vscr'        /* telephone scripting defProc interfaces    */
  32.  
  33. #define vbndType    'vbnd'        /* bundle type for telephone */
  34.  
  35.  
  36. struct TELSetupStruct {
  37.     DialogPtr     theDialog;
  38.     short        count;
  39.     Ptr         theConfig;
  40.     short        procID;
  41. };
  42.  
  43. typedef struct TELSetupStruct TELSetupStruct;
  44. typedef TELSetupStruct *TELSetupPtr;
  45.  
  46. struct TELForwardPB {
  47.     StringPtr            forwardDN;
  48.     StringPtr            forwardPartyName;
  49.     StringPtr            forwardSubaddress;
  50.     short                forwardType;
  51.     short                numRings;
  52. };
  53.  
  54. typedef struct TELForwardPB TELForwardPB;
  55.  
  56.  
  57. struct TELTermMsgPB{
  58.     short                toolID;
  59.     short                tRef;
  60.     long                msg;
  61.     short                mtype;
  62.     short                value;
  63. };
  64.  
  65. typedef struct TELTermMsgPB TELTermMsgPB;
  66.  
  67. struct TELDNMsgPB {
  68.     short                toolID;
  69.     short                tRef;
  70.     short                dnRef;
  71.     long                msg;
  72.     short                mtype;
  73.     short                value;
  74.     StringPtr            rmtDN;
  75.     StringPtr            rmtName;
  76.     StringPtr            rmtSubaddress;
  77. };
  78.  
  79. typedef struct TELDNMsgPB TELDNMsgPB;
  80.  
  81. struct TELCAGenericMsgPB {
  82.     short                toolID;
  83.     short                tRef;
  84.     short                dnRef;
  85.     short                caRef;
  86.     long                msg;
  87.     short                mtype;
  88.     short                value;
  89.     StringPtr            rmtDN;
  90.     StringPtr            rmtName;
  91.     StringPtr            rmtSubaddress;
  92.     short                dialType;
  93. };
  94. typedef struct TELCAGenericMsgPB TELCAGenericMsgPB;
  95.  
  96. struct TELCADisconMsgPB {
  97.     short                toolID;
  98.     short                tRef;
  99.     short                dnRef;
  100.     short                caRef;
  101.     long                msg;
  102.     short                mtype;
  103.     short                value;
  104. };
  105. typedef struct TELCADisconMsgPB TELCADisconMsgPB;
  106.  
  107. struct TELCAConfMsgPB {
  108.     short                toolID;
  109.     short                tRef;
  110.     short                dnRef;
  111.     short                caRef;
  112.     long                msg;
  113.     short                mtype;
  114.     short                value;
  115. };
  116. typedef struct TELCAConfMsgPB TELCAConfMsgPB;
  117.  
  118. struct TELCATransfMsgPB {
  119.     short                toolID;
  120.     short                tRef;
  121.     short                dnRef;
  122.     short                caRef;
  123.     long                msg;
  124.     short                mtype;
  125.     short                value;
  126.     StringPtr            rmtDN;
  127.     StringPtr            rmtName;
  128.     StringPtr            rmtSubaddress;
  129.     short                dialType;
  130. };
  131. typedef struct TELCATransfMsgPB TELCATransfMsgPB;
  132.  
  133.  
  134. /********************************************************************************/
  135. /*  The following two message blocks are sent when the tool has outgoing call   */
  136. /*  or incoming call information, but no handle has been allocated for the call */
  137. /********************************************************************************/
  138.  
  139. /* used by tool to send CAOffer and CAAlerting messages to the Manager Master Message Handler */
  140. struct TELCAInOutMsgPB {
  141.     short                toolID;
  142.     short                tRef;
  143.     short                dnRef;
  144.     short                caRef;
  145.     long                msg;
  146.     short                mtype;
  147.     short                value;
  148.     StringPtr            rmtDN;
  149.     StringPtr            rmtName;
  150.     StringPtr            rmtSubaddress;
  151.     short                caState;
  152.     short                intExt;
  153.     short                callType;
  154.     short                dialType;
  155.     short                bearerType;
  156.     short                rate;
  157.     StringPtr            routeDN;
  158.     StringPtr            routeName;
  159.     StringPtr            routeSubaddress;
  160.     long                featureFlags;
  161.     long                otherFeatures;
  162.     long                telCAPrivate;
  163.     
  164. };
  165. typedef struct TELCAInOutMsgPB TELCAInOutMsgPB;
  166.  
  167.  
  168. typedef pascal void (*TELTermProcPtr)(Ptr pb);
  169. typedef pascal void (*TELDNProcPtr)(Ptr pb);
  170. typedef pascal void (*TELCAProcPtr)(Ptr pb);
  171.  
  172.  
  173. enum {
  174.  
  175.     telValidateMsg            = 0,
  176.     telDefaultMsg            = 1,
  177.  
  178.     telMgetMsg                = 0,
  179.     telMsetMsg                = 1,
  180.  
  181.     telSpreflightMsg        = 0,
  182.     telSsetupMsg            = 1,
  183.     telSitemMsg                = 2,
  184.     telSfilterMsg            = 3,
  185.     telScleanupMsg            = 4,
  186.  
  187.     telL2EnglishMsg            = 0,
  188.     telL2IntlMsg            = 1,
  189.  
  190.  
  191.     telNewMsg                = 0,
  192.     telDisposeMsg            = 1,
  193.     telSuspendMsg            = 2,
  194.     telResumeMsg            = 3,
  195.     telMenuMsg                = 4,
  196.     telEventMsg                = 5,
  197.     telActivateMsg            = 6,
  198.     telDeactivateMsg        = 7,
  199.  
  200.     telIdleMsg                = 50,
  201.     telOpenTermMsg            = 51,    
  202.     telResetTermMsg            = 52,
  203.     telCloseTermMsg            = 53,
  204.     telTermMsgHandMsg        = 54,
  205.     telClrTermMsgHandMsg    = 55,
  206.     telTermEventsSuppMsg    = 56,
  207.     telGetInfoMsg            = 57,    
  208.  
  209.     telCountDNsMsg            = 60,    
  210.     telDNLookupByIndexMsg     = 61,
  211.     telDNLookupByNameMsg    = 62,
  212.     telCallbackClearMsg        = 63,
  213.     telOtherFeatListMsg        = 64,
  214.     telOtherFeatImplMsg        = 65,
  215.     telToolFunctionsMsg        = 66,
  216.     telOtherFunctionMsg        = 67,
  217.  
  218.     telGetHookswMsg            = 70,
  219.     telSetHookswMsg            = 71,
  220.     telGetVolumeMsg            = 72,
  221.     telSetVolumeMsg            = 73,
  222.     telAlertMsg                = 74,
  223.     telGetDisplayMsg        = 75,
  224.     telSetDisplayMsg        = 76,
  225.  
  226.  
  227.     telDNSelectMsg            = 100,
  228.     telDNDisposeMsg            = 101,
  229.     telGetDNInfoMsg            = 102,
  230.     telGetDNFlagsMsg        = 103,
  231.     telDNMsgHandMsg            = 104,
  232.     telClrDNMsgHandMsg        = 105,
  233.     telDNEventsSuppMsg        = 106,
  234.  
  235.     telCountCAsMsg            = 110,
  236.     telCALookupMsg            = 111,
  237.     telCAMsgHandMsg            = 112,
  238.     telClrCAMsgHandMsg        = 113,
  239.     telCAEventsSuppMsg        = 114,
  240.     telSetupCallMsg            = 115,
  241.  
  242.     telForwardSetMsg        = 120,
  243.     telForwardClearMsg        = 121,
  244.     telDNDSetMsg             = 122,
  245.     telDNDClearMsg            = 123,
  246.  
  247.     telCADisposeMsg            = 200,
  248.     telGetCAStateMsg        = 201,
  249.     telGetCAFlagsMsg        = 202,
  250.     telGetCAInfoMsg            = 203,
  251.     telConnectMsg             = 204,
  252.     telDialDigitsMsg         = 205,
  253.     telAcceptCallMsg        = 206,
  254.     telRejectCallMsg        = 207,
  255.     telDeflectCallMsg        = 208,
  256.     telAnswerCallMsg        = 209,
  257.     telDropMsg                = 210,
  258.     telHoldMsg                = 211,
  259.     telRetrieveMsg            = 212,
  260.     telConfSplitMsg            = 213,
  261.     telTransfBlindMsg        = 214,
  262.     telCallbackSetMsg        = 215,
  263.     telCallbackNowMsg        = 216,
  264.     telCallPickupMsg         = 217,
  265.     telParkCallMsg             = 218,
  266.     telRetrieveParkedCallMsg= 219,
  267.     telVoiceMailAccessMsg    = 220,
  268.     telPagingMsg            = 221,
  269.     telIntercomMsg            = 222,
  270.  
  271.     telConfPrepMsg            = 230,
  272.     telConfEstMsg             = 231,
  273.     telTransfPrepMsg        = 232,
  274.     telTransfEstMsg            = 233,
  275.     
  276.     telGetDNSoundInputMsg        = 240,
  277.     telDisposeDNSoundInputMsg     = 241,
  278.     telGetDNSoundOutputMsg        = 242,
  279.     telDisposeDNSoundOutputMsg     = 243,
  280.     telGetHSSoundInputMsg        = 244,
  281.     telDisposeHSSoundInputMsg     = 245,
  282.     telGetHSSoundOutputMsg        = 246,
  283.     telDisposeHSSoundOutputMsg     = 247,
  284.     telDNSetDTMFMsg                = 248,
  285.     telDNGetDTMFMsg                = 249,
  286.     telHSSetDTMFMsg                = 250,
  287.     telHSGetDTMFMsg                = 251,
  288.     telGetDNStatusMsg            = 252,
  289.     telGetDNProgressDetMsg        = 253,
  290.     telSetDNProgressDetMsg        = 254,
  291.     
  292.     telDNSetAutoAnswerMsg        = 260,
  293.     telDNTollSaverControlMsg     = 261,
  294.     telSetIndHSConnectMsg        = 262,
  295.     telGetIndHSConnectMsg        = 263,
  296.     
  297.     telCAVoiceDetectMsg            = 270,
  298.     telCASilenceDetectMsg        = 271
  299. };
  300.  
  301.  
  302. #endif
  303.  
  304.  
  305.     
  306.